const Base = require('../base.js');

module.exports = class extends Base {
  /// 检查管理员是否已经创建
  async indexAction() {
    let data = this.post()
    await this.model('admin/index').edit(data)
    let admin_user = await this.model('admin/index').get()
    this.json({
      status: 200,
      message: 'success',
      data: {
        nickname: admin_user.nickname,
        phone: admin_user.phone,
        headpic: admin_user.headpic,
      }
    })
  }
};
